-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add missing spanner config properties #152
Conversation
rahul2393
commented
Jun 1, 2023
•
edited
Loading
edited
- Update all deps
- Add support of setting rpcPriority
- Add support of setting numChannels
- Add support of setting databaseRole
- Add support of setting optimizerVersion
- Add support of setting optimizerStatisticsPackage
531412b
to
aebaa09
Compare
driver.go
Outdated
default: | ||
priority = spannerpb.RequestOptions_PRIORITY_UNSPECIFIED | ||
} | ||
config.ReadOptions = spanner.ReadOptions{Priority: priority} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we assign a default ReadOptions
when creating config something like spanner.ReadOptions{}
and then just assign user configured priority
here like config.ReadOptions.Priority = priority
, instead of overwriting ReadOptions
?
Otherwise when user wants to configure RequestTag
in ReadOptions it gets overwritten.
Same for others also TransactionOptions
and QueryOptions
Correct me if i am missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can directly do config.ReadOptions.Priority = priority
because config.ReadOptions
will be having default ReadOptions
property set by default and will not be nil
.
driver.go
Outdated
@@ -46,13 +47,22 @@ const userAgent = "go-sql-spanner/1.0.1" | |||
// 3. (Optional) Parameters: One or more parameters in the format `name=value`. Multiple entries are separated by `;`. | |||
// The supported parameters are: | |||
// - credentials: File name for the credentials to use. The connection will use the default credentials of the | |||
// environment if no credentials file is specified in the connection string. | |||
// environment if no credentials file is spec`ified in the connection string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// environment if no credentials file is spec`ified in the connection string. | |
// environment if no credentials file is specified in the connection string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM